﻿package mortal.game.view.lookPlayerInfo.view
{
    import Message.Game.*;
    import com.mui.controls.*;
    import com.mui.utils.*;
    import mortal.component.window.*;

    public class LookPlayerInfoPanel extends GSprite
    {
        private var _playerInfoPanel:LookPlayerModelPanel;
        private var _attributeInfoPanel:LookPlayerAttributePanel;
        private var _slookPlayerInfo:SLookPlayerInfo;
        private var _window:Window;

        public function LookPlayerInfoPanel(param1:Window)
        {
            this._window = param1;
            return;
        }// end function

        public function set window(param1:Window) : void
        {
            this._window = param1;
            this._playerInfoPanel = UICompomentPool.getUICompoment(LookPlayerModelPanel, this._window);
            this._playerInfoPanel.window = this._window;
            this._playerInfoPanel.x = 16;
            this._playerInfoPanel.y = 63;
            this.addChild(this._playerInfoPanel);
            this._attributeInfoPanel = UICompomentPool.getUICompoment(LookPlayerAttributePanel);
            this._attributeInfoPanel.x = 504;
            this._attributeInfoPanel.y = 37;
            this._window.contentTopOf3DSprite.addChild(this._attributeInfoPanel);
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            this._playerInfoPanel.dispose(param1);
            this._playerInfoPanel = null;
            this._attributeInfoPanel.dispose(param1);
            this._attributeInfoPanel = null;
            this._slookPlayerInfo = null;
            super.disposeImpl(param1);
            return;
        }// end function

        public function set data(param1:SLookPlayerInfo) : void
        {
            this._slookPlayerInfo = param1;
            this._playerInfoPanel.updateInfo(param1);
            this._attributeInfoPanel.updateInfo(param1);
            return;
        }// end function

    }
}
